package com.homegoods.home.model;

import android.os.Parcel;
import android.os.Parcelable;

import com.homegoods.home.item.SearchClassifyItem;
import com.kedll.library.adapter.MultiTypeAdapter;
import com.kedll.library.mvp.BaseModel;

/**
 * add shibo.zheng
 * 19/06/24
 * 搜索界面618/折扣等过滤标签
 */
public class SearchClassifyModel extends BaseModel<SearchClassifyItem> implements Parcelable {
    private String itemName;

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public SearchClassifyModel(String itemName) {
        this.itemName = itemName;
    }

    protected SearchClassifyModel(Parcel in) {
        itemName = in.readString();
    }

    public static final Creator<SearchClassifyModel> CREATOR = new Creator<SearchClassifyModel>() {
        @Override
        public SearchClassifyModel createFromParcel(Parcel in) {
            return new SearchClassifyModel(in);
        }

        @Override
        public SearchClassifyModel[] newArray(int size) {
            return new SearchClassifyModel[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(itemName);
    }

    @Override
    public SearchClassifyItem createItem(MultiTypeAdapter adapter) {
        return new SearchClassifyItem(this);
    }
}
